﻿using System.Web.Mvc;

namespace TSharp.Core.Mvc.Web
{
    /// <summary>
    /// 视图引擎
    /// <para>2010/9/16</para>
    /// 	<para>TANGJINGBO</para>
    /// 	<author>tangjingbo</author>
    /// </summary>
    public class TSharpViewEngine : WebFormViewEngine
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TSharpViewEngine"/> class.
        /// </summary>
        public TSharpViewEngine()
        {
            base.PartialViewLocationFormats = new[]
                                                  {
                                                      "~/Views/Shared/{0}.ascx",
                                                      "~/Views/{1}/partials/{0}.ascx",
                                                  };

            base.ViewLocationFormats = new[]
                                           {
                                               "~/Views/{1}/{0}.aspx",
                                               "~/Views/Shared/{0}.aspx",
                                               "~/Views/{1}/partials/{0}.ascx",
                                           };

            base.MasterLocationFormats = new[]
                                             {
                                                 "~/Views/Shared/{0}.master"
                                             };
        }
    }
}